<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/
  defined('_JEXEC') or die('Retricted Access');
  global $option;
  $item = $this->item;    
  $user_id = JRequest::getVar('userid');
  if ($user_id)
  $item->user_id = $user_id;
  $item_title = JRequest::getVar('item_title');
  $customer = JRequest::getVar('username');
?>

<form name="adminForm" action="index.php" method="post" enctype="multipart/form-data">

	<table width="100%">
	<?php 
	$task = JRequest::getVar('task');
	if ($task=='trans_viewbyuser')
	{
	?>
		<tr>
			<td width="80%" valign="top">
				<div style="width:100%;">
					<?php echo $this->menu();?>
				</div>
			</td>
		</tr>
	<?php
	}
	?>	
	<tr>
	
		<td width="80%" valign="top" align="left">
		
		    <div style="width:100%;">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'Transaction details' ); ?></legend>
						<table class="admintable">
						<tr>
							<td class="key">
								<label for="id" width="100">
									<?php echo JText::_( 'Transaction ID' ); ?>:					
								</label>
								
							</td>
							<td colspan="2">
								<?php echo $item->id; ?>
									
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="product_id" width="100">
									<?php echo JText::_( 'Product' ); ?>:					
								</label>
								
							</td>
							<td colspan="2">
								<?php echo $item_title; ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="txn_id" width="100">
									<?php echo JText::_( 'Receipt ID' ); ?>:					
								</label>
								
							</td>
							<td colspan="2">
								<?php echo $item->txn_id; ?>
							</td>
						</tr>						
						<tr>
							<td class="key">
								<label for="created_date">
									<?php echo JText::_( 'Created date' ); ?>:							
								</label>												
							</td>
							<td>
								<?php  echo generateDate($item->created_date); ?>						
							</td>
						</tr>
						<tr>
							<td valign="top" class="key">
								<label for="user_id">
									<?php echo JText::_( 'Customer' ); ?>:	
								</label>
							</td>
							<td>
								<?php echo $customer; ?>
								
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="amount">
									<?php echo JText::_('Amount' ); ?>
								</label>
							</td>
							<td>
								<?php echo JText::_($item->amount.'&nbsp;'.$item->currency_code); ?>
							</td>
						</tr>
						<tr>
							<td width="120" class="key">
								<?php echo JText::_( 'Status' ); ?>:						</td>
							<td>
								
							<?php echo ($item->completed=='1')?JText::_('Completed'):JText::_('Reverse'); ?>		
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="processed_date">
									<?php echo JText::_( 'Processed date' ); ?>:							
								</label>												
							</td>
							<td>
								<?php  echo generateDate($item->processed_date); ?>						
							</td>
						</tr>						
						<tr>
							<td class="key">
								<label for="product_type">
									<?php echo JText::_( 'Product type' ); ?>:	
								</label>
							</td>
							<td>
		       				<?php 
		       					echo isset($this->product_type[$item->product_type])?$this->product_type[$item->product_type]:'';				
		       				?>								
							</td>
						</tr>
						<tr>
							<td class="key">
								<label for="value">
									<?php echo JText::_( 'Product value' ); ?>:	
								</label>
							</td>
							<td> 
		       					<?php echo $item->value;?>
							</td>
						</tr>		
						<tr>
							<td class="key">
								<label for="payment_method">
									<?php echo JText::_( 'Payment Method' ); ?>:
								</label>						
							</td>
							<td valign="top" colspan="3">
								<?php
									echo $item->payment_method;
								?>
							</td>
						</tr>						
						<tr>
							<td class="key">
								<label for="ip">
									<?php echo JText::_( 'IP Address' ); ?>:
								</label>						
							</td>
							<td valign="top" colspan="3">
								<?php echo $item->ip; ?>
							</td>
						</tr>	
						<tr>
							<td class="key">
								<label for="reason">
									<?php echo JText::_( 'Reason' ); ?>:
								</label>						
							</td>
							<td valign="top" colspan="3">
								<?php echo JText::_($item->reason); ?>
							</td>
						</tr>	
						<tr>
							<td class="key">
								<label for="detail">
									<?php echo JText::_( 'Detail' ); ?>:
								</label>						
							</td>
							<td valign="top" colspan="3">
								<?php
									echo $item->detail;
								?>
							</td>
						</tr>												
					</table>
				</fieldset>
					
				
			
			</div>
			
		</td>
	</tr>
			
	<tr>
		<td>
			<fieldset>
			<legend><?php echo JText::_('Received data'); ?></legend>
			<table>
				<tr>
					<td>
						<?php echo $item->datas; ?>
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
	</tr>
	</table>
	<input type="hidden" name="completed" value="" />
	<input type="hidden" name="id" value="<?php echo $item->id; ?>">
	<input type="hidden" name="reference" value="<?php echo $item->reference; ?>">
	<input type="hidden" name="option" value="<?php echo $option; ?>" />
	<input type="hidden" name="view" value="jatransactions" />
	<input type="hidden" name="cid" value="<?php echo $item->id; ?>" />
	<input type="hidden" name="boxchecked" value="1" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="pre_task" value="<?php echo $task; ?>" />
	<input type="hidden" name="userid" value="<?php echo $user_id; ?>" />
</form>